package com.jiujia.game.sdk.login.internal;

import com.jiujia.game.sdk.base.core.model.JGameSdkUserInfo;
import com.jiujia.game.sdk.base.util.JGameLog;
import com.jiujia.game.sdk.login.api.ILoginService;
import com.jiujia.game.sdk.login.api.LoginCallback;
import com.jiujia.game.sdk.login.ui.dialog.TermsDialog;

/**
 * *************************************************
 * Class: JGameLoginService
 * Author: Jiujia
 * Time: 2025/5/2 16:49
 * Description:
 * *************************************************
 */
public class JGameLoginService implements ILoginService {
    @Override
    public void init() {
        new TermsDialog().builder().setAgreeOnClickListener((view -> {
            JGameLog.i("------------- 同意了用户和隐私协议 ------------");
        })).show();
    }

    @Override
    public void login(LoginCallback callback) {
        JGameLog.i("------------- JGameLoginService_login -------------");
        if (callback != null) {
            callback.onSuccess(new JGameSdkUserInfo("123456", "token123456"));
        }

    }
}
